package com.liuxing.doctor.service.impl;

import com.liuxing.doctor.entity.Inspection;
import com.liuxing.doctor.mapper.InspectionMapper;
import com.liuxing.doctor.service.InspectionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author 行柳
 * 学习使用
 */
@Service
public class InspectionServiceImpl implements InspectionService {
    @Resource
    private InspectionMapper inspectionMapper;
    @Override
    public List<Inspection> queryByPatientId(String patient_id) {
        return inspectionMapper.selectByPatientId(patient_id);
    }

    @Override
    public Inspection queryByInspectionId(String inspectionId) {
        return inspectionMapper.selectByInspectionId(inspectionId);
    }

    @Override
    public Integer createOneInspectionProject(Map<String, Object> map) {
        return inspectionMapper.insertOneInspectionProject(map);
    }

    @Override
    public Integer updateOneInspectionProjectById(Map<String,Object> map) {
        return inspectionMapper.updateOneInspectionProjectById(map);
    }

    @Override
    public Integer queryLastInsertId() {
        return inspectionMapper.selectLastInsertId();
    }

    @Override
    public int deleteOneInspectionProjectById(String inspectionId) {
        return inspectionMapper.deleteOneInspectionProjectById(inspectionId);
    }
}
